package base;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

public class CApplication implements CTitleSetter {
	public static CFrame Frame;
	
	public static void main( String[] args ) {
		Frame = new CFrame();
		//Frame.setExtendedState( Frame.getExtendedState() | JFrame.MAXIMIZED_BOTH );
		CGraphics.Component = Frame.Canvas;
		CGraphics.TitleSetter = new CApplication();
		
		try {
			UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
		} catch (ClassNotFoundException ex) {
			Logger.getLogger(CProject.class.getName()).log(Level.SEVERE, null, ex);
		} catch (InstantiationException ex) {
			Logger.getLogger(CProject.class.getName()).log(Level.SEVERE, null, ex);
		} catch (IllegalAccessException ex) {
			Logger.getLogger(CProject.class.getName()).log(Level.SEVERE, null, ex);
		} catch (UnsupportedLookAndFeelException ex) {
			Logger.getLogger(CProject.class.getName()).log(Level.SEVERE, null, ex);
		}

		CGraphics.Init();
		Frame.setVisible(true);
		CBase.Run();
	}

	public void SetTitle( String Title ) {
		Frame.setTitle( Title );
	}
}
